//
//  ChinaPetroleumMachineryTableViewCell.m
//  AnXin100
//
//  Created by Sakura on 2018/11/12.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "ChinaPetroleumMachineryTableViewCell.h"

@interface ChinaPetroleumMachineryTableViewCell ()

@property (nonatomic, strong) UIImageView *iconImage;

@property (nonatomic, strong) UILabel *contentLabel;

@end

@implementation ChinaPetroleumMachineryTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self creatCell];
    }
    return self;
}

- (void)creatCell {
    _contentLabel = [UILabel new];
    _contentLabel.textColor = [UIColor colorWithHex:0x333333];
    _contentLabel.font = FONT_FOURTEEN;
    _contentLabel.numberOfLines = 0;
    _contentLabel.text = @"农业技术综合运用示范,中国农业取得了长足的发展，其中农业科技发挥了巨大作用，为了加强农业技术推广工作，，保障农业的发展，实现农业现代化，制定本法。";
    [_contentLabel alignTop];
    [self.contentView addSubview:_contentLabel];
    
    _iconImage = [[UIImageView alloc] init];
    _iconImage.image = [UIImage imageNamed:@"ChinaPetroleumMachinery"];
    [self.contentView addSubview:_iconImage];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    _iconImage.sd_layout
    .topSpaceToView(self.contentView, 10)
    .leftSpaceToView(self.contentView, 10)
    .bottomSpaceToView(self.contentView, 10)
    .widthEqualToHeight();
    
    
    _contentLabel.sd_layout
    .leftSpaceToView(_iconImage, 10)
    .topEqualToView(_iconImage)
    .bottomEqualToView(_iconImage)
    .rightSpaceToView(self.contentView, 10);
}

- (void)awakeFromNib {
    [super awakeFromNib];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    
}

@end
